package com.wanmait.employment.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wanmait.employment.entity.EntryTime;
import com.wanmait.employment.entity.NatureWork;
import com.wanmait.employment.mapper.EntryTimeMapper;
import com.wanmait.employment.service.EntryTimeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EntryTimeServiceImpl implements EntryTimeService {
    @Resource
    private EntryTimeMapper entryTimeMapper;

    @Override
    public List<EntryTime> selectList(String title) {
        QueryWrapper<EntryTime>queryWrapper=new QueryWrapper<>();
        queryWrapper.like("title",title);
        return entryTimeMapper.selectList(queryWrapper);
    }


    @Override
    public Integer update(EntryTime entryTime) {
        return entryTimeMapper.updateById(entryTime);
    }

    @Override
    public Integer insert(EntryTime entryTime) {
        return entryTimeMapper.insert(entryTime);
    }

    @Override
    public void delete(Integer id) {
       entryTimeMapper.deleteById(id);
    }

}
